package com.forum.demo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;

@Data
public class UserInfo {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String username;

    @JsonIgnore // 不参与JSON序列化
    private String password;

    private String nickname;

    private String phoneNum;

    private String email;

    private Byte gender;

    @JsonIgnore // 不参与JSON序列化
    private String salt;

    @JsonInclude(JsonInclude.Include.ALWAYS) // 强制参与JSON序列化
    private String avatarUrl;

    private Integer articleCount;

    private Byte isAdmin;

    private String remark;

    private Byte state;

    @JsonIgnore // 不参与JSON序列化
    private Byte deleteState;

    private Date createTime;

    private Date updateTime;
}
